package com.todo.strategy.online.infrastructure.repository;


import com.todo.common.common.entity.response.page.PageResult;
import com.todo.strategy.common.enums.StrategyStatusEnum;
import com.todo.strategy.online.infrastructure.entity.condition.StrategyInfoCondition;
import com.todo.strategy.online.infrastructure.entity.po.StrategyInfoPO;

import java.util.List;

/**
 * (StrategyInfo)表服务接口
 *
 * @author zhangwenxiang
 * @since 2024-03-04 21:10:04
 */
public interface StrategyInfoRepository {

    /**
     * 新增攻略信息
     *
     * @param strategyInfoPO
     * @return
     */
    Boolean insertStrategyInfoPO(StrategyInfoPO strategyInfoPO);

    /**
     * 根据主键id更新攻略信息
     *
     * @param strategyInfoPO
     * @return
     */
    Boolean updateStrategyInfoPOById(StrategyInfoPO strategyInfoPO);

    /**
     * 根据主键id删除攻略信息
     *
     * @param id
     * @return
     */
    Boolean removeStrategyInfoPOById(Long id);

    /**
     * 根据主键id查询攻略信息
     *
     * @param id
     * @return
     */
    StrategyInfoPO queryStrategyInfoPOById(Long id);

    /**
     * 多条件查询攻略信息列表
     *
     * @param strategyInfoCondition
     * @return
     */
    PageResult<StrategyInfoPO> queryStrategyInfoPOByCondition(StrategyInfoCondition strategyInfoCondition);

    /**
     * 多条件查询攻略信息数量
     *
     * @param strategyInfoCondition
     * @return
     */
    Long queryCountByCondition(StrategyInfoCondition strategyInfoCondition);

    /**
     * 根据用户以及清单计划查询攻略信息
     *
     * @param userId
     * @param planId
     * @return
     */
    StrategyInfoPO queryStrategyInfoPOByPlanId(Long userId, Long planId);

    /**
     * 根据主键id查询攻略信息列表
     *
     * @param strategyIdList
     * @return
     */
    List<StrategyInfoPO> queryStrategyInfoByIdList(List<Long> strategyIdList);

    /**
     * 更新攻略状态
     *
     * @param id
     * @param oldStatus
     * @param newStatus
     * @return
     */
    Boolean updateStrategyStatus(Long id, StrategyStatusEnum oldStatus, StrategyStatusEnum newStatus);
}
